<div class="fadeIn">
    <br />
    <ol class="breadcrumb" style="margin-bottom: 0px;">
        <li class="active">
            <span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;
            <mainpage></mainpage>
        </li>
        <li class="active">运维工作台 / 参数配置管理 / 接口参数管理 / 业务端管理</li>
    </ol>
    <div class="rightbar">
        <div id="serviceEnd" class="showEle sign1">
            <form action="svrNodeDef/out-excel" method="post" id="form">
                <div class="left marT15 marR10">
                    <span class="search-name">业务端编码</span>
                    <input type="text" class="form-control1" name="svrNode" placeholder="请输入编码" ng-keyup='search($event)'
                        ng-model="searchData.svrNode">
                </div>
                <div class="left marR10 marT15">
                    <span class="search-name">业务端名称</span>
                    <input type="text" class="form-control1" placeholder="请输入名称" name="svrNodeName" ng-keyup='search($event)'
                        ng-model="searchData.svrNodeName">
                </div>
                <div class="left marR10 marT15">
                    <span class="search-name">接入方式</span>
                    <select class="form-control1" ng-model="searchData.upflag" name="upflag">
                        <option value="">全部</option>
                        <option value="1">沿用旧平台</option>
                        <option value="2">使用新平台</option>
                    </select>
                </div>
                <div class="left marR10 marT15">
                    <span class="search-name">是否白名单</span>
                    <select class="form-control1" ng-model="searchData.srvtype" name="srvtype">
                        <option value="">全部</option>
                        <option value="1">是</option>
                        <option value="0">否</option>
                    </select>
                </div>
            </form>
            <a href="javascript:;" class=" btn btn-sm btn-primary left marT15" id="search" ng-click='search()'>
                <span class="glyphicon glyphicon-search"></span>
            </a>
            <div class="right marT15" style="position:relative">
                <button class="btn btn-sm btn-primary" ng-click='outExcel()'>
                    <img style="width:25px; height:20px;" src="img/excel.png">导出表格
                    <span ng-style='loadStyle' class="outExcelLoad">
                        <img src="img/load.gif">
                    </span>
                </button>
            </div>

            <div class="table-box">
                <table class="table table-bordered table-striped text-center bg-info marT15">
                    <thead>
                        <tr class="info">
                            <th class="text-center">序号</th>
                            <th class="text-center">业务端编码</th>
                            <th class="text-center">业务端名称</th>
                            <th class="text-center">接入方式</th>
                            <th class="text-center">发送端口</th>
                            <th class="text-center">登陆用户名</th>
                            <th class="text-center">最大连接数</th>
                            <th class="text-center">服务IP</th>
                            <th class="text-center">服务端口</th>
                            <th class="text-center">服务登陆用户名</th>
                            <th class="text-center">服务登陆密码</th>
                            <th class="text-center">状态</th>
                            <th class="text-center">是否白名单</th>
                            <th class="text-center">业务端说明</th>
                            <th class="text-center">操作</th>
                        </tr>
                    </thead>
                    <tbody id="appList">
                        <tr ng-repeat="Item in result">
                            <td>{{ $index+1 }}</td>
                            <td class="w115">{{ Item.svrNode }}</td>
                            <td class="w115">{{Item.svrNodeName }}</td>
                            <td class="w115">
                                <span ng-if='"2"==Item.upflag'>使用新平台</span>
                                <span ng-if='"1"==Item.upflag'>沿用旧平台</span>
                            </td>
                            <td class="w85">{{Item.sendPort}}</td>
                            <td class="w115">{{Item.loginUser}}</td>
                            <td class="w115">{{Item.conNum}}</td>
                            <td class="w85">{{Item.serverIp}}</td>
                            <td class="w85">{{Item.serverPort}}</td>
                            <td style="min-width: 130px;">{{Item.loginSvrUser}}</td>
                            <td class="w115">{{Item.loginSvrPwd}}</td>
                            <td>
                                <span ng-if='"1"==Item.status'>生效</span>
                                <span ng-if='"0"==Item.status'>失效</span>
                            </td>
                            <td style="min-width: 120px;">{{ Item.srvtype }}</td>
                            <td style="min-width: 200px; word-break: break-all;">{{Item.desc}}</td>
                            <td style="min-width: 300px">
                                <a href="javascript:;" class="marR10" ng-if="'1' == Item.status" ng-click="changee($index,Item.svrNode,Item.status)">失效</a>
                                <a href="javascript:;" class="marR10" ng-if="'0' == Item.status" ng-click="changee($index,Item.svrNode,Item.status)">生效
                                </a>
                                <a class="marR10" data-toggle="modal" data-target="#smsSettings" ng-click="smsSettings(Item.svrNode)">短信设置</a>
                                <a class="marR10" data-toggle="modal" data-target="#add1" ng-click="editTr('修改',Item.svrNode)">修改</a>
                                <a class="marR10" data-toggle="modal" data-target="#delete" ng-click="delete(Item.svrNode,$index)">删除</a>
                                <a data-toggle="modal" data-target="#iswhite" ng-click="editwhite(Item.srvtype,Item.svrNode)">白名单设置</a>
                            </td>
                        </tr>
                    </tbody>
                    <tfoot>
                        <tr>
                            <td>
                                <a class="glyphicon glyphicon-plus" data-toggle="modal" data-target="#add1" ng-click="editTr('添加')"></a>
                            </td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                    </tfoot>
                </table>
            </div>


            <page></page>
        </div>
    </div>
</div>
<!--右侧内容结束-->
</div>

<!--添加程序弹窗-->
<div class="modal fade" id="add1" tabindex="-1" role="dialog" aria-labelledby="add1">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="">{{popup}}业务端信息</h4>
            </div>
            <div class="modal-body">
                <div class="row marB15">
                    <span class="col-xs-6">
                        <label class="left">
                            <span>业务端编码：</span>
                        </label>
                        <input type="text" ng-disabled='isDisabled' class="form-control line4 right" ng-disabled='isDisabled'
                            ng-model="addData.svrNode" />
                    </span>
                    <span class="col-xs-6">
                        <label class="left">
                            <span>业务端名称：</span>
                        </label>
                        <input type="text" class="form-control line4 right show" ng-model="addData.svrNodeName " />
                    </span>
                </div>
                <div class="marB15 row">
                    <span class="col-xs-6">
                        <label class="left">
                            <span>最大连接数 ：</span>
                        </label>
                        <input type="text" onkeyup="this.value=this.value.replace(/\D/g,'')" oninput="if(value.length>9)value=value.slice(0,9)"
                            class="right line4 form-control show" ng-model="addData.conNum">
                    </span>
                    <span class="col-xs-6">
                        <label class="left">
                            <span>接入登入用户：</span>
                        </label>
                        <input type="text" class="form-control line4 right show" ng-model="addData.loginUser" />
                    </span>
                </div>
                <div class="row marB15">
                    <span class="col-xs-6">
                        <label class="left">
                            <span>接入登入密码：</span>
                        </label>
                        <input type="text" class="form-control line4 right show" oninput="if(value.length>16)value=value.slice(0,16)"
                            ng-model="addData.loginPwd" />
                    </span>
                    <span class="col-xs-6">
                        <label class="left">
                            <span>服务ip：</span>
                        </label>
                        <input type="text" id="serverIp" class="form-control line4 right show" ng-model="addData.serverIp" />
                    </span>
                </div>
                <div class="row marB15">
                    <span class="col-xs-6">
                        <label class="left">
                            <span>服务端口：</span>
                        </label>
                        <input type="text" onkeyup="this.value=this.value.replace(/\D/g,'')" oninput="if(value.length>9)value=value.slice(0,9)"
                            class="form-control line4 right show" ng-model="addData.serverPort" />
                    </span>
                    <span class="col-xs-6">
                        <label class="left">
                            <span>服务接入用户：</span>
                        </label>
                        <input type="text" class="form-control line4 right show" ng-model="addData.loginSvrUser" />
                    </span>
                </div>
                <div class="row marB15">
                    <span class="col-xs-6">
                        <label class="left">
                            <span>服务接入密码：</span>
                        </label>
                        <input type="text" class="form-control line4 right show" oninput="if(value.length>16)value=value.slice(0,16)"
                            ng-model="addData.loginSvrPwd" />
                    </span>
                </div>
                <div class="row marB15">
                    <div class="col-xs-6">
                        <label class="left">
                            <span>状态 ：</span>
                        </label>
                        <select class="form-control line4 right" ng-model="addData.status">
                            <option value="1">生效</option>
                            <option value="0">失效</option>
                        </select>
                    </div>
                    <span class="col-xs-6">
                        <label class="left">
                            <span>发送端口号：</span>
                        </label>
                        <input type="text" onkeyup="this.value=this.value.replace(/\D/g,'')" class="form-control line4 right show"
                            oninput="if(value.length>20)value=value.slice(0,20)" ng-model="addData.sendPort" />
                    </span>
                </div>
                <div class="row marB15">
                    <div class="col-xs-6">
                        <label class="left">
                            <span>流量控制：</span>
                        </label>
                        <input type="text" class="form-control line4 right show" ng-model="addData.maxFlux" />
                    </div>
                    <div class="col-xs-6">
                        <label class="left">
                            <span>接入方式 ：</span>
                        </label>
                        <select class="form-control line4 right" ng-model="addData.upflag">
                            <option value="1">沿用旧平台</option>
                            <option value="2">使用新平台</option>
                        </select>
                    </div>
                </div>
                <div class="row marB15">
                    <span class="col-xs-12">
                        <label class="left">
                            <span>业务端说明：</span>
                        </label>
                        <textarea class="form-control right" style="width:436px;" id='desc' ng-model="addData.desc"></textarea>
                    </span>
                </div>
                <div class="form-group row marT15">
                    <label class="col-sm-3 control-label">是否白名单:</label>
                    <div class="col-sm-3" style="margin-left:-35px;">
                        <label class="radio-inline">
                            <input type="radio" value="1" name="srvtype" ng-model="addData.srvtype">是
                        </label>
                        <label class="radio-inline">
                            <input type="radio" value="0" name="srvtype" ng-model="addData.srvtype">否
                        </label>
                    </div>
                </div>
                <div class="form-group row marT15">
                    <label class="col-sm-3 control-label">接收上行短信:</label>
                    <div class="col-sm-6" style='margin-left:-35px;'>
                        <label class="radio-inline ">
                            <input type="radio" name="acceptMo" value="0" ng-model="addData.acceptMo"> 是
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="acceptMo" value="1" ng-model="addData.acceptMo"> 否
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="acceptMo" value='2' ng-model="addData.acceptMo"> 系统强制关闭接收
                        </label>
                    </div>
                </div>
                <div class="form-group row marT15">
                    <label class="col-sm-3 control-label">接收状态报告:</label>
                    <div class="col-sm-6" style='margin-left:-35px;'>
                        <label class="radio-inline">
                            <input type="radio" name="acceptReport" value="0" ng-model="addData.acceptReport"> 是
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="acceptReport" value='1' ng-model="addData.acceptReport"> 否
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="acceptReport" value='2' ng-model="addData.acceptReport"> 系统强制关闭接收
                        </label>
                    </div>
                </div>
                <div class="form-group row marT15">
                    <label class="col-sm-3 control-label">开启短信类型检测:</label>
                    <div class="col-sm-6" style='margin-left:-35px;'>
                        <label class="radio-inline">
                            <input type="radio" name="smTypecheck" value="0" ng-model="addData.smTypecheck"> 是
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="smTypecheck" value='1' ng-model="addData.smTypecheck"> 否
                        </label>
                    </div>
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary btn-sm" ng-click="editSave()">保存</button>
            </div>
        </div>
    </div>
</div>
<!-- 删除信息提示 -->
<div class="modal fade" id="delete">
    <div class="modal-dialog">
        <div class="modal-content message_align">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">提示信息</h4>
            </div>
            <div class="modal-body">
                <p>您确认要删除吗？</p>
            </div>
            <div class="modal-footer">
                <input type="hidden" id="url" />
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <a id="deleteSure" class="btn btn-primary" data-dismiss="modal" ng-click="deleteTr()">确定</a>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<!-- 短信设置弹出框 -->
<div class="modal fade" id="smsSettings" tabindex="-1" role="dialog" aria-labelledby="smsSettings">
    <div class="modal-dialog" role="document">
        <form name="smsForm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="cancel()">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">请设置营销业务端可发送的短信类型：</h4>
                </div>
                <div class="modal-body">
                    <div class="row marB15 marL0" ng-if="smsSel.length">
                        <h5>已选的短信类型:</h5>
                        <span class="checkboxSelList" id='smsSelItem'>
                            <span class='content-lists' ng-repeat="item in smsSel">
                                <span style='height:18px;'>
                                    <input type='checkbox' value={{item.serviceCode}} name='smsSelItem' ng-model='isSmsSel'
                                        ng-click='checkboxClick($event,$index)' sName={{item.serviceName}} ng-checked="item.isSelected" />
                                </span>
                                <label style='width: 80%;line-height: 18px;vertical-align:top;margin-bottom: 0px;overflow: hidden;padding-left: 6px;'>{{item.serviceName}}</label>
                            </span>
                        </span>
                    </div>
                    <div style="border-bottom: 1px solid #d4d4d4" ng-if="smsSel.length && setData.length"></div>
                    <div class="row marB15 marL0" ng-if="setData.length">
                        <h5 ng-if="smsSel.length && setData.length">未选的短信类型:</h5>
                        <span class="checkboxList" id='smsSettingsItem'>
                            <span class='content-lists' ng-repeat="item in setData">
                                <span style='height:18px;'>
                                    <input type='checkbox' value={{item.serviceCode}} name='smsSettingsItem' ng-model='isSmsSel'
                                        ng-click='checkboxClick($event,$index)' sName={{item.serviceName}} />
                                </span>
                                <label style='width: 80%;line-height: 18px;vertical-align:top;margin-bottom: 0px;overflow: hidden;padding-left: 6px;'>{{item.serviceName}}</label>
                            </span>
                        </span>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default btn-sm" data-dismiss="modal" ng-click="cancel()">取消</button>
                    <button type="button" class="btn btn-primary btn-sm" ng-click="setSave('保存')">保存</button>
                </div>
            </div>
        </form>
    </div>
</div>

<!-- 设置白名单 -->
<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="editList" id="iswhite">
    <div class="modal-dialog" role="document">
        <form action="">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">是否是白名单</h4>
                </div>
                <div class="modal-body" id="whiteList">
                    <label class="radio-inline">
                        <input type="radio" value="1" name="isWhite" ng-model="whiteData.srvtype">是
                    </label>
                    <label class="radio-inline">
                        <input type="radio" value="0" name="isWhite" ng-model="whiteData.srvtype">否
                    </label>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" ng-click="editList(srvtype,svrNode)">确定</button>
                </div>
            </div>
        </form>
    </div>
</div>

</body>

</html>
<!-- 加载框 -->
<span class='loaded' ng-show='loaded'>
    <img src="img/load.gif">
</span>
<!-- 加载框 完成-->